<?php
/**
 * Class show all action of product categories
 *
 * @author NguyenVanTien
 */
class ProductCategoriesController extends Zend_Controller_Action {
    
    /**
     * Instance product category model
     * @var Application_Model_ProductCategories 
     */
    private $_modelCategory = null;
    
    public function init(){
        $this->_modelCategory = new Application_Model_ProductCategories();
    }
    
    /**
     * Action default of class controller 
     * @author Tien Nguyen
     */
    public function indexAction(){
        
    }
    
    /**
     * Action show category layout
     * @author Tien Nguyen
     */
    public function showCategoryLayoutAction(){
        //get current category 
        $paramsLayout = Zend_Registry::get('paramsLayout');
        $categoryId = isset($paramsLayout['category-id']) ? $paramsLayout['category-id'] : '';
        
        $categories = $this->_modelCategory->getList();
        $this->view->categories = $categories;
        $this->view->categoryId = $categoryId;
    }
}